{include file="common/meta"}

<body>
<div class="x-body" id="adminEdit">
    <form class="layui-form" id="form_data">
        <div class="layui-form-item">
            <label for="username" class="layui-form-label">
                账号
            </label>
            <div class="layui-input-inline">
                <input type="text" id="username" name="username"  value=""
                       autocomplete="off" class="layui-input">
            </div>

        </div>

        <div class="layui-form-item">
            <label for="password" class="layui-form-label">
                密码
            </label>
            <div class="layui-input-inline">
                <input type="password" id="password" name="password"  value=""
                       autocomplete="off" class="layui-input">
            </div>

        </div>

        <div class="layui-form-item">
            <label for="username" class="layui-form-label">
                昵称
            </label>
            <div class="layui-input-inline">
                <input type="text" id="nickname" name="nickname" value=""
                       autocomplete="off" class="layui-input">
            </div>

        </div>

        <div class="layui-form-item">
            <label  class="layui-form-label">
                手机号
            </label>
            <div class="layui-input-inline">
                <input type="text" name="mobile_tel" value=""
                       autocomplete="off" class="layui-input">
            </div>

        </div>

        <div class="layui-form-item">
            <label  class="layui-form-label">
                邮箱
            </label>
            <div class="layui-input-inline">
                <input type="email" name="email" value=""
                       autocomplete="off" class="layui-input">
            </div>

        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">性别</label>
            <div class="layui-input-block">
                <input type="radio" name="sex" value=0 title="男" checked>
                <input type="radio" name="sex" value=1 title="女">
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">部门</label>
            <div class="layui-input-inline">
                <select  name="groupid">
                    {volist name="group" id="vo"}
                    <option value="{$vo.id}">{$vo.title}</option>
                    {/volist}
                </select>
            </div>
        </div>




        <div class="layui-form-item">
            <label class="layui-form-label">入职时间</label>
            <div class="layui-input-inline">
                <input type="text" name="workdate" id="workdate1"  placeholder="入职时间" autocomplete="off"
                       class="layui-input laydate1" value="">
            </div>
        </div>

        <!--<div class="layui-form-item">-->
            <!--<label class="layui-form-label">离职时间</label>-->
            <!--<div class="layui-input-inline">-->
                <!--<input type="text" id="quitdate1" name="quitdate" placeholder="离职时间" autocomplete="off"-->
                       <!--class="layui-input laydate2" value="">-->
            <!--</div>-->
        <!--</div>-->

        <div class="layui-form-item">
            <label class="layui-form-label">身份证号</label>
            <div class="layui-input-inline">
                <input type="number" name="id_card" placeholder="身份证号"
                       autocomplete="off" class="layui-input" value="">
            </div>
        </div>

        <!--<div class="layui-form-item">-->
            <!--<label class="layui-form-label">工资卡开户行</label>-->
            <!--<div class="layui-input-inline">-->
                <!--<input type="text" name="bankname"  placeholder="工资卡开户行"-->
                       <!--autocomplete="off" class="layui-input" value="">-->
            <!--</div>-->
        <!--</div>-->

        <!--<div class="layui-form-item">-->
            <!--<label class="layui-form-label">工资卡账号</label>-->
            <!--<div class="layui-input-inline">-->
                <!--<input type="number" name="banknum"  placeholder="工资卡账号"-->
                       <!--autocomplete="off" class="layui-input" value="">-->
            <!--</div>-->
        <!--</div>-->

        <!--<div class="layui-form-item">-->
            <!--<label class="layui-form-label">职位</label>-->
            <!--<div class="layui-input-inline">-->
                <!--<input type="text" name="ranking"  placeholder="职位"-->
                       <!--autocomplete="off" class="layui-input" value="">-->
            <!--</div>-->
        <!--</div>-->
        <div class="layui-form-item">
            <div class="layui-input-block">
                <button class="layui-btn" type="button" id="button_add">立即提交</button>
            </div>
        </div>


    </form>
</div>
<script>

    laydate.render({
        elem: '#workdate1' //指定元素
    });
    laydate.render({
        elem: '#quitdate1' //指定元素
    });
    $('#button_add').click(function () {
        $.ajax({
            url:'{:url("add")}',
            type:'post',
            dataType:'json',
            data:$('#form_data').serializeArray(),
            success:function (res) {
                console.log(res);
                // layer.alert(res.msg,function () {
                //     x_admin_close();
                //     x_admin_father_reload();
                // },1000)
            }

        })
    })
</script>
</body>

</html>